// 模版字符串
const nam = 'congyang'
const gender = true

function myTagFunc (strings) {
    // console.log(strings, nam, gender)
    return '123'
}

const string = myTagFunc`hey, ${nam} is a ${gender}`
console.log(string)

// 字符串的扩展方法
// startsWith
// endsWith
// inclueds

const msg = 'Error: xxx is not defined.'
console.log(msg.startsWith('Error')) // 判断开头
console.log(msg.endsWith('。')) // 判断是否以输入的字符串结尾
console.log(msg.includes('xxxx')) // 字符串中间查找，有返回true，没有返回false




